var jsMods = ['vue'];
var bigStampMapPopupVm;
CafeJS.models(jsMods, function(Vue) {
    bigStampMapPopupVm = new Vue({
        el: '#bigStampMapPopUp',
        data: {
            bigImg: '/business/szyb/css/images/legend/096.png',
            bigImgUrl: "/drawmake/makedraw/getPreviewImg",
            stampMapLegend: "",
            title: "",
        },
        mounted: function() {
            this.init();
        },
        methods: {
            init: function() {
                var _this = this;
                $("#modal_bigStampMapPopUp .modal-header").remove();
                $("#modal_bigStampMapPopUp .modal-body").css({ "overflow-y": "hidden" });
                _this.queryData(stampMainVm.bigMapResult);
                _this.stampMapLegend = stampMainVm.stampMapLegend;
                _this.title = stampMainVm.bigMapResult.title;
            },
            hide: function() {
                CafeJS.ModalBoxClose("bigStampMapPopUp");
            },
            queryData: function(bigMapResult, sence) {
                var _this = this;
                var url = _this.bigImgUrl;
                var params = {
                    fcstTime: bigMapResult.time,
                    element: bigMapResult.element,
                    mode: bigMapResult.mode,
                    startP: bigMapResult.startP,
                    endP: bigMapResult.endP,
                    range: bigMapResult.range
                };
                $.get(url, params, function(result) {
                    if (result) {
                        _this.bigImg = "data:img/png;base64," + result;
                        _this.imgObject();
                    } else {
                        _this.bigImg = '';
                    }
                }, "text");
            },
            imgObject: function() {
                var _this = this;
                var bigImg = document.getElementById('bigStampImg');
                _this.imageview = new ImageView(bigImg, {
                    movingCheck: false,
                    scaleNum: 1,
                });
            },
            scaleL: function() {
                this.imageview.scale(0.1);
            },
            scaleS: function() {
                this.imageview.scale(-0.1);
            },
        }
    });
})